//
//  SEGTopicTextViewModel.h
//  Commom
//
//  Created by Clavis on 2019/7/29.
//

#import <Foundation/Foundation.h>

#if __has_include(<Commom/SEGText.h>)
#import <Commom/SEGText.h>
#else
#import "SEGText.h"
#endif

#define kTopicTextViewHeight 173.0     // TopicTextView的高度
//内容的最小高度
#define minContentHeight 120.0
#define contentXPadding 70.0
#define contentTopPadding 17.5
#define contentBottomPadding 30.0
#define contentLabelLeftPadding 18.0
#define contentLabelTopPadding 22.5

@interface SEGTopicTextViewModel : NSObject

@property (nonatomic, copy) NSString *content; // 参与内容
@property (nonatomic, copy) NSString *topicTitle; // 话题标题
@property (nonatomic, strong) UIColor *bgColor; // 背景颜色
@property (nonatomic, assign) CGFloat widgetWidth; //控件总宽度
@property (nonatomic, assign) CGFloat topicTitleWidth; //话题标签宽度
@property (nonatomic, assign) BOOL isMoreLines; //是否有更多行（超过三行）

@end

@interface SEGTopicTextViewLayout : NSObject

@property (nonatomic, assign,readonly) CGFloat totalHeight;//控件总高度
@property (nonatomic, strong,readonly)SEGTopicTextViewModel *data;
- (instancetype)initWithData:(SEGTopicTextViewModel *)data;
-(void)segTopicTextViewLayout;

@property (nonatomic, assign) CGFloat contentLabelWidth;//contentLabel 宽度
@property (nonatomic, assign) CGFloat contentLabelHeight;//contentLabel 高度
@property (nonatomic, strong) SEGTextLayout *contentLabelTextLayout;//contentLabel 富文本布局
@property (nonatomic, assign) CGFloat contentViewHeight;//参与内容容器高度
@property (nonatomic, assign) CGFloat contentBgViewHeight;//参与内容背景高度

@property (nonatomic, assign) CGFloat topicTitleLabelHeight;//topicTitleLabel 高度
@property (nonatomic, strong) SEGTextLayout *topicTitleLabelTextLayout;//topicTitleLabel 富文本布局

@end
